#include "../in_out.h"

/*
Pasa el contenido de un buffer a otro.
*/
void flush_buffer_into_buffer(buffer_t* buff_out, buffer_t* buff_in){
	int tmp;
	for(tmp=(buff_out->end+1)%BUFFER_SIZE; tmp!=buff_out->start &&
	buff_in->start!=buff_in->end ; tmp=(buff_out->end+1)%BUFFER_SIZE){
	
		buff_out->array[buff_out->end]=buff_in->array[buff_in->start];
		buff_in->start=(buff_in->start+1)%BUFFER_SIZE;
		buff_out->end=tmp;
	}
}
